<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>

        div{
            width: 200px;
            height: 200px;
            background: rebeccapurple;
            transition: all 2s;
            margin: 10px auto;
        
        }

        div:hover{
            /* transform: translateX(100px) translateY(100px); */
            transform: translate(100px,100px);
            
        }
    </style>

</head>
<body>

<div></div>
    
</body>
</html>